<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - Essay Helper</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <div class="container auth-container">
        <header>
            <h1><i class="fas fa-book-reader"></i> Essay Helper</h1>
            <p>登录您的账户</p>
        </header>
        
        <div class="auth-form-container">
            {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                    {% for category, message in messages %}
                        <div class="flash-message {{ category }}">
                            {% if category == 'error' %}
                                <i class="fas fa-exclamation-circle"></i>
                            {% else %}
                                <i class="fas fa-check-circle"></i>
                            {% endif %}
                            {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}
            {% endwith %}
            
            <form method="POST" action="{{ url_for('login') }}" class="auth-form">
                <div class="form-group">
                    <label for="username"><i class="fas fa-user"></i> 用户名</label>
                    <input type="text" id="username" name="username" required>
                </div>
                
                <div class="form-group">
                    <label for="password"><i class="fas fa-lock"></i> 密码</label>
                    <input type="password" id="password" name="password" required>
                </div>
                
                <button type="submit" class="auth-btn"><i class="fas fa-sign-in-alt"></i> 登录</button>
            </form>
            
            <div class="auth-links">
                <p>还没有账户？ <a href="{{ url_for('register') }}">注册</a></p>
                <p><a href="{{ url_for('index') }}"><i class="fas fa-home"></i> 返回首页</a></p>
            </div>
        </div>
        
        <footer>
            <p><i class="fas fa-code"></i> PDF processing tools for students and researchers</p>
        </footer>
    </div>
</body>
</html> 